package com.ruoyi.littleRedBook.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("reviews")
public class Review {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("order_id")
    private Long orderId;

    @TableField("reviewer_id")
    private Long reviewerId; // 评价人ID（买家）

    @TableField("reviewed_id")
    private Long reviewedId; // 被评价人ID（卖家）

    @TableField("product_id")
    private Long productId;

    private Integer rating; // 1-5分

    private String content;

    @TableField("reply_content")
    private String replyContent;

    @TableField("is_anonymous")
    private Integer isAnonymous; // 0-实名 1-匿名

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    private LocalDateTime updatedAt;
}
